// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: let P be the empty string if pattern is undefined
es5id: 15.10.4.1_A3_T2
description: RegExp is new RegExp(void 0)
---*/

function Test() {
    var __re = new RegExp(void 0);

    assert.sameValue(__re.multiline, false, 'The value of __re.multiline is expected to be false');
    assert.sameValue(__re.global, false, 'The value of __re.global is expected to be false');
    assert.sameValue(__re.ignoreCase, false, 'The value of __re.ignoreCase is expected to be false');
}

// preheat
const NUMBER_OF_PREHEAT = 1;
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}

ArkTools.jitCompileAsync(Test);
assert.sameValue(ArkTools.waitJitCompileFinish(Test), true, '[JIT] JIT disabled.');

// test
const NUMBER_OF_TEST = 1; // or 2
for (let i = 0; i < NUMBER_OF_PREHEAT; i++) {
    Test();
}
